package com.xunwulian.base.dao;

import com.xunwulian.base.entity.Page;
import com.xunwulian.base.entity.TransactionEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2016/12/15.
 */
@Mapper
public interface TransactionDao {

    Integer insert(TransactionEntity transactionEntity);

    void updateRecordp(@Param("recordm") String recordm,
                       @Param("recordp") String recordp);

    void updateTransStatus(@Param("recordm") String recordm,
                           @Param("isPay") Integer isPay);

    TransactionEntity loadById(@Param("id") Integer id);

    TransactionEntity loadByRecordm(@Param("recordm") String recordm);

    List<Map<String, Object>> listTransactionRecently(@Param("userId") String userI,
                                                      @Param("createDate") Date createDate);

    List<TransactionEntity> listPageTransaction(@Param("page") Page page,
                                            @Param("userId") String userId);
}
